#!/usr/bin/env python 

import numpy

from specks import *

s = Speck()

for i in range(16):
    s.addAtom('Al', numpy.random.normal(0, 2, 3))

beam.speck = s
beam.start()

m = Morse()

qm = QuickMin(s, m, dt = 0.1)
m.force(s)
while norm(s.f) > 0.0001:
    qm.step()
    print norm(s.f)
s.r[0] = [64.0, 0.0, 0.0]

xyz.save("nve.xyz", s, 'w')

nve = NVE(s, m, dt = 0.03125)
s.v[0] = [-2.0, 0.0, 0.0]

while beam.running:
    nve.step()
    xyz.save("nve.xyz", s, 'a')
    
    


